home *** CD-ROM | disk | FTP | other *** search
-
-
- L-Utils
-
- L-Ram The ST recoverable RAMdisk
- L-Cache The ST disk-caching system
-
- Shareware Software (c) 1988 by Keith Ledbettter
- -----------------------------------------------
-
-
- Welcome to L-RAM and L-CACHE for your Atari ST. I wrote these programs
- about 8 months ago for my own use in my software development. These programs
- were originally going to be part of a commercial product, but I have since
- decided to offer them through the "share-ware" market. So, these programs
- are well-tested and bullet-proof. I have been using both daily for the last
- 8 months, and they have both been running non-stop on the Midnight Express!
- bulletin board (804-379-4156) for about the last 6 months. Both of these
- programs are written in assembler, so they perform at a very high rate of
- speed. I hope you enjoy them!
-
-
-
- What's in the ARC file.
- -----------------------
-
- The following programs are present in the LUTILS.ARC file:
-
- L-UTILS.DOC - The file you are reading now.
-
- L-CONFIG.PRG - The configuration program for both the
- cache and the RAMdisk.
-
- L-CONFIG.RSC - The resource file for the configuration program.
-
- L-RAM.PRG - The RAMdisk program.
-
- L-CACHE.PRG - The disk cache program.
-
- L-STATS.TOS - Shows disk-cache statistics.
-
-
-
- L-RAM, The Recoverable RAMdisk
- ------------------------------
-
-
- L-RAM was written mainly for the extra memory available in the new MegaST
- machines, but it functions just as well on a 520ST as it does a 4-MEG Mega.
- L-RAM takes advantage of the large memory-model machines by allocating much
- more directory storage than most ST Ramdisks do. L-RAM allows up to 256
- directory entries in the main (root) directory. L-RAM is also reset-proof,
- so your RAMdisk data will be restored if you press the reset button on the
- back of your machine. This is invaluable to people doing software development.
-
-
-
- L-CACHE, The ST Disk Cache
- --------------------------
-
-
- What is a disk cache? Well, a disk cache can be thought of as kind of a
- "RAMdisk hybrid". A disk cache allocates a portion of the memory in your
- machine for its use, and then "stores" recently accessed portions of disk data
- into this area. The next time a disk access is requested, the cache looks in
- its buffers in memory to see if that information is already in memory. If it
- is, then the cache acts just like a RAMdisk and sends the data from memory to
- the requestor of the data, just as though it had been read from disk.
-
-
- If the data is not currently in memory, then the cache program reads the
- data from the disk, saves it in its buffers, and then returns the data to the
- requestor (which can be a program, GemDOS, etc.).
-
-
- Once the disk cache buffers fill up, and new data must be stored, the cache
- must "purge" some data out of the buffers to make way for the new data to be
- stored. L-CACHE uses the very-popular "LRU" method for buffer management.
- In layman terms, it simply replaces the data that has been in the buffer
- (without being accessed) for the longest period of time.
-
-
- L-CACHE is a "write-through" cache, which means that any WRITES to disks get
- performed IMMEDIATELY, so there is no chance of you losing any data. It would
- be nice to cache writes and then write them to the disk at pre-determined
- times, but it's just too dangerous in a small-computer environment.
-
-
- A unique feature of L-CACHE is that you can specify (a) what drives you want
- to be cached and what drives you don't want to be cached, and (b) whether you
- want to do "read-only" caching or "read-write" caching on a particular drive.
- What?? You just told me L-RAM didn't cache writes! Well, what I mean by
- "write caching" is "do you want L-CACHE to save writes into its buffers after
- writing the information to the disk?".
-
-
- It's a little hard to understand, so let's take an example. Let's assume
- that you have L-CACHE set up for a 100K cache. Now, let's say you do a COPY
- of a 50,000 byte program (A.PRG) from drive C: to drive D:. If you had drive
- D: set up as a "write caching" drive, that single copy command would flush the
- ENTIRE 100,000 byte cache buffer. This is because as the source file got read
- it would be put into the cache buffers (thereby occupying 50K), and as the
- destination file got written, that data would also be placed into the cache
- buffers, thereby occupying the other 50K of the cache.
-
-
- If you had drive D: set up as a "read-only" cache, then the above COPY
- command would cause only half of the cache buffers to get purged. This is
- because only the reading of the source file would get buffered; writes to
- the file on drive D: would simply be passed through and ignored.
-
-
- If you have a drive set up as "read-cache", and a write occurs to that drive,
- then L-CACHE will check to see if the sector being written is currently in
- memory. If it is, then L-CACHE will update that buffer in memory prior to
- passing the write on to the disk.
-
-
- L-CACHE will cache both single-sector and multi-sector reads.
-
-
-
- Using and configuring L-RAM and L-CACHE
- ---------------------------------------
-
-
- L-RAM.PRG and L-CACHE.PRG must be placed in your \auto\ folder on your
- boot drive. *** L-RAM.PRG MUST BE LOADED BEFORE L-RCACHE.PRG ***. This
- simply means copy L-RAM to your auto folder, then copy L-CACHE.
-
- After placing these two programs in the \auto\ folder, copy the L-CONFIG.PRG
- and L-CONFIG.RSC files to the root (main) directory of the drive. Now, click
- on L-CONFIG.PRG to configure the programs.
-
- After loading L-CONFIG, you will be presented with the normal GEM menu-bar.
- Move the mouse to "Configure" and choose the "Configure cache" selection.
- The program will load in the current configuration from the \auto-\l-cache.prg
- file. At the top of the screen is the area where you specify what caching
- action to perform on each drive. Simply choose one of the selections "Read
- only", "Read/Write", or "Don't cache". Then, use the slide bar at the bottom
- of the screen to specify how much memory you want to be allocated for the
- cache. I usually use around 100K for this, but you'll need to tune it to
- your specific memory requirements. When you are done, click on the "Save
- Configuration" box and the program will update the \auto\l-cache.prg file to
- reflect the new configurations.
-
-
- Next, move the mouse to "Configure" and choose the "Configure Ramdisk"
- selection. The program will load in the current configuration from the
- \auto-\l-ram.prg file. At the top of the screen is the area where you
- specify which drive you want to be your RAMdisk drive. Then, just as in the
- cache configuration, use the slide bar at the bottom of the screen to specify
- how memory you want to be allocated for the RAMdisk. When you are done, click
- on the "Save Configuration" box and the program will update the
- \auto\l-cache.prg file to reflect the new configurations.
-
-
- The last file on the disk is L-STATS.TOS. This program will show you the
- current statistics on the disk cache. These statistics include
-
- - The total disk accesses requested
-
- - The total number of cache "hits" (a hit is when
- a sector requested was found in memory).
-
- - The total number of cache "misses" (a miss is when
- a sector requested was not found in memory and
- had to be read from disk).
-
- - The percentage of disk accesses that were "hits".
-
- This program can be run periodically to help you "fine tune" the size of
- your disk cache. For example, if you are continually showing a hit
- percentage of 10%, then you are probably wasting time even using the disk
- cache, or you should dramatically increase the memory allocated to it.
-
-
- If you have any questions about these utilities, you can leave me Email at
- any of the following places:
-
- CompuServe: 76701,124
- GEnie : K.LEDBETTER
-
- Enjoy!
-
- Keith Ledbetter
-
-